import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCmsSiteLinksController } from '../../../controllers';
const uctoocmsSiteLinksRouter = new Router();
const cmsSiteLinksController = new uctooCmsSiteLinksController();

uctoocmsSiteLinksRouter.post('/add', requireUser, cmsSiteLinksController.add);
uctoocmsSiteLinksRouter.post('/edit', requireUser, rowLevelPermission('uctoo/cms_site_links'), cmsSiteLinksController.edit);
uctoocmsSiteLinksRouter.post('/del', requireUser, rowLevelPermission('uctoo/cms_site_links'), cmsSiteLinksController.delete);

//For getting cmsSiteLinks with permission control
uctoocmsSiteLinksRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/cms_site_links'), cmsSiteLinksController.getSingle);
uctoocmsSiteLinksRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/cms_site_links'), cmsSiteLinksController.getMany);
uctoocmsSiteLinksRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/cms_site_links'), cmsSiteLinksController.getMany);

//#endregion AutoCreateCode
export default uctoocmsSiteLinksRouter;
